<script language=JavaScript>
<!--
function CheckDoc(frm)
{
	if(frm.txtName.value==""){alert("¡ÃØ³ÒãÊèª×èÍ"); frm.txtName.focus();return false;}
	if(frm.txtSurname.value==""){alert("¡ÃØ³ÒãÊè¹ÒÁÊ¡ØÅ"); frm.txtSurname.focus();return false;}
	if(frm.txtAge.selectedIndex<=0){alert("¡ÃØ³ÒÃÐºØÍÒÂØ"); frm.txtAge.focus();return false;}
	if(frm.txtEmail.value==""){alert("¡ÃØ³ÒãÊèÍÕàÁÅì"); frm.txtEmail.focus();return false;}
	if(frm.txtEmail.value!="")
	{
	if(!IsEmail(frm.txtEmail.value)){alert("¡ÃØ³ÒãÊèÍÕàÁÅìãËé¶Ù¡µéÍ§"); frm.txtEmail.focus();return false;}
	}

	return true;
}
	function IsEmail(str)
	{
		var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
		if (filter.test(str))
		{
		return true
		}
		else
		{
		return false
		}
	}
//-->
</script>
<?php if($IsOK==false){?>
						<!-- start--> 
						<form name="frm" method="post" action="register.php" onsubmit="return CheckDoc(document.frm)">
						<input name="mm" type="hidden" id="mm" value="ok">
                        <table width="90%" border="0" cellspacing="15" cellpadding="0">
                  <tr>
                    <td width="80">&nbsp;</td>
                    <td width="35"><img src="../images/day/00_newsletter_name.gif" width="81" height="20"></td>
                    <td><input name="txtName" type="text" class="textnormal_grey" id="txtName" size="40"></td>
                  </tr>
                  <tr>
                    <td width="80">&nbsp;</td>
                    <td width="35"><img src="../images/day/00_newsletter_lastname.gif" width="81" height="19"></td>
                    <td><input name="txtSurname" type="text" class="textnormal_grey" id="txtSurname" size="40"></td>
                  </tr>
                  <tr>
                    <td width="80">&nbsp;</td>
                    <td width="35"><img src="../images/day/00_newsletter_age.gif" width="81" height="19"></td>
                    <td><select name="txtAge" class="textnormal_grey" id="txtAge">
                      <option>-------------------</option>
					  <?php
					  $my="";
					  for ($i=5;$i<100;$i++)
						{
						  $my .= "<option value=$i>$i</option>";											
						}
						echo $my;
					  
					  ?>
                    </select>                    </td>
                  </tr>
                  <tr>
                    <td width="80">&nbsp;</td>
                    <td width="35"><img src="../images/day/00_newsletter_email.gif" width="81" height="20"></td>
                    <td><input name="txtEmail" type="text" class="textnormal_grey" id="txtEmail" size="40"></td>
                  </tr>
                  <tr>
                    <td width="80">&nbsp;</td>
                    <td width="35">&nbsp;</td>
                    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td width="120"><INPUT TYPE="image" SRC="../images/okay_btn.gif"></td>
                        <td><a href="#" onclick="javascript:document.frm.reset();"><img src="../images/day/00_newsletter_cancel.gif" width="90" height="31" border="0"></a></td>
                      </tr>
                    </table></td>
                  </tr>
                </table>
				</form>
<?php } ?>
				<!-- end-->

                          <!-- isOK-->
						  <?php if(($IsOK==true) and ($haveError==false)){?>
                          <table border="0" align="center" cellpadding="0" cellspacing="5">
                            <tr> 
                              <td height="100" align="center" ><B>Email ¢Í§·èÒ¹ä´éºÑ¹·Ö¡ã¹ÃÐººàÃÕÂºÃéÍÂáÅéÇ<BR>¢Íº¤Ø³·ÕèãªéºÃÔ¡ÒÃ</B> <BR><BR><a href="register.php">OK</a></td>
                            </tr>
                          </table>
						  <?php }?>
						  <!-- end IsOK-->		
						  <?php if(($IsOK==true) and ($haveError==true)){?>
                          <table border="0" align="center" cellpadding="0" cellspacing="5">
                            <tr> 
                              
                            <td height="100" align="center"><B>email: 
                              <?php echo $email?><BR> ¹ÕéÁÕÍÂÙèã¹ÃÐººàÃÕÂºÃéÍÂáÅéÇ¡ÃØ³Òãªé email Í×è¹</B><BR>
                              <a href="register.php">¡ÅÑºä»Å§·ÐàºÕÂ¹ãËÁè</a></td>
                            </tr>
                          </table>
						  <?php }?>
						  <!-- end IsOK-->				